<?php
//echo "<pre>";
//print_r($courses);
//echo "</pre>";
//die();
?>
<?php echo $this->load->view("schedule/course_nav"); ?>
<br  />
<div class="course">
	<?php foreach ($courses as $row) { ?>
		<div class="xleft">
			<a class="listcourse din" href="detail/<?php echo $row['kode_pelatihan']."/".$row['angkatan']; ?>">
				<?php echo $row['kode_pelatihan']; ?> | <?php echo $row['nama_pelatihan']; ?> | Angkatan <?php echo $row['angkatan']; ?>
			</a>
		</div>
	<div class="xleft bar2" title="Course progress <?php echo round( (($row['pelatihan_selesai'])/$row['jum_pelatihan']*100), 2)."% - ".$row['pelatihan_selesai']."/".$row['jum_pelatihan']; ?>">
			<table width="120" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<?php for($i=0; $i < $row['pelatihan_selesai']; $i++) {?>
					<td class="done"></td>
					<?php }?>
					<?php for($i=0; $i < ($row['jum_pelatihan']-$row['pelatihan_selesai']);$i++){?>
					<td class="yet"></td>
					<?php }?>
				</tr>
			</table>
		</div>
		<br class="clear"/>
	<?php } ?>
</div>